/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React from 'react';
import { Table, Divider } from 'antd';

const CommonTable = (props) => {
  const { title, columns, datasource = [], loading, ...rest } = props;
  const titleStyle = {
    fontSize: '16px',
    fontWeight: 'bold',
    color: '#000',
  };
  return (
    <>
      <Table
        title={() => <div style={titleStyle}>{title}</div>}
        rowKey={'id'}
        dataSource={datasource}
        columns={columns}
        pagination={false}
        style={{ marginTop: 20 }}
        scroll={{ x: 1200 }}
        loading={loading}
        {...rest}
      />
    </>
  );
};

export default CommonTable;
